//
//  MyMoneyViewController.m
//  duoduo
//
//  Created by wanghao on 16/10/12.
//  Copyright © 2016年 LX. All rights reserved.
//

#import "MyMoneyViewController.h"
#import "ChongZhiViewController.h"

@interface MyMoneyViewController ()

@end

@implementation MyMoneyViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"我的余额";
    self.view.backgroundColor = LXHexColor(0xF5F6F7);
    [self initUI];
}

- (void)initUI
{
    UIView * yueView = [[UIView alloc]initWithFrame:CGRectMake(ScreenWidth/2-80, ScreenHeight/2-150, 160, 50)];
    yueView.backgroundColor = [UIColor clearColor];
    //图片
    UIImageView * moneyImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 10, 30, 30)];
    moneyImageView.image = [UIImage imageNamed:@"yue"];
    [yueView addSubview:moneyImageView];
    //余额文字
    UILabel * yuelabel = [[UILabel alloc]initWithFrame:CGRectMake(40, 15, 120, 20)];
    yuelabel.text = @"账户余额 (元)";
    yuelabel.font = [UIFont systemFontOfSize:18];
    [yueView addSubview:yuelabel];
    [self.view addSubview:yueView];

    UIView * qianView = [[UIView alloc]initWithFrame:CGRectMake(ScreenWidth/2-100, ScreenHeight/2-100, 200, 50)];
    qianView.backgroundColor = [UIColor clearColor];
    UILabel * qianLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 200, 50)];
    qianLabel.text = @"¥ 200.00";
    qianLabel.font = [UIFont systemFontOfSize:40];
    [qianView addSubview:qianLabel];
    [self.view addSubview:qianView];


    UIButton * button = [[UIButton alloc]init];
    button.frame = CGRectMake(25, ScreenHeight-150, ScreenWidth-50, 50);
    button.backgroundColor = LXHexColor(0x5DCA68);
    [button setTitle:@"充值" forState:UIControlStateNormal];
    [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    button.titleLabel.font = [UIFont systemFontOfSize:22];
    button.layer.cornerRadius = 6;
    button.layer.masksToBounds = YES;
    [button addTarget:self action:@selector(chongzhiClick) forControlEvents:UIControlEventTouchUpInside];

    [self.view addSubview:button];

}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    self.navigationController.navigationBar.hidden = NO;
    self.tabBarController.tabBar.hidden=YES;
}

- (void)chongzhiClick
{
    ChongZhiViewController * vc = [[ChongZhiViewController alloc]init];
    [self.navigationController pushViewController:vc animated:YES];
}

@end
